package tomsung.cloud.agdc.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import tomsung.cloud.agdc.bean.CropStepInfo;
import tomsung.cloud.agdc.dao.CropStepInfoMapper;

@Service("CropStepInfoService")
public class CropStepInfoService {

	@Autowired
	CropStepInfoMapper cropStepInfoMapper;
	
	public int createCropStepData(CropStepInfo record)
	{
		return cropStepInfoMapper.insertSelective(record);
	}
	
	public int deleteCropStepData(Integer stepId, Integer plantType)
	{
		return cropStepInfoMapper.deleteByPrimaryKey(stepId, plantType);
	}
	
	public CropStepInfo selectCropStepData(Integer stepId, Integer plantType)
	{
		return cropStepInfoMapper.selectByPrimaryKey(stepId, plantType);
	}
	
	public int updateCropStepData(CropStepInfo record)
	{
		return cropStepInfoMapper.updateByPrimaryKey(record);
	}
	
	public List<CropStepInfo> selectCropStepData(Integer plantType)
	{
		return cropStepInfoMapper.selectCropStepData(plantType);
	}
	
	public List<CropStepInfo> selectCropStepInfoDataAll()
	{
		return cropStepInfoMapper.selectCropStepDataAll();
	}
}
